package com.data.center.entity.mongo;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@Document(collection = "mongo_paper")
public class MongoPaper {


        @Id // MongoDB 自动生成的唯一标识符
        private String id;

        @Field("candidate_id")
        private String candidateId; // 候选对象ID

        @Field("paper_id")
        private String paperId; // 会议论文ID

        @Field("chinese_title")
        private String chineseTitle; // 中文标题

        @Field("english_title")
        private String englishTitle; // 英文标题

        @Field("type")
        private String type; // 论文类别

        @Field("position")
        private Integer position; // 个人排序

        @Field("conference")
        private String conference; // 会议名称

        @Field("place")
        private String place; // 会议地点

        @Field("year_of_conference")
        private LocalDateTime yearOfConference; // 会议年份

        @Field("year_of_publication")
        private Integer yearOfPublication; // 发表年份

        @Field("language")
        private String language; // 语言

        @Field("pages")
        private String pages; // 页码范围

        @Field("chinese_abstract")
        private String chineseAbstract; // 中文摘要

        @Field("english_abstract")
        private String englishAbstract; // 英文摘要

        @Field("chinese_keywords")
        private String chineseKeywords; // 中文关键词

        @Field("english_keywords")
        private String englishKeywords; // 英文关键词

        @Field("full_text")
        private String fullText; // 全文

        @Field("link")
        private String link; // 全文链接

        @Field("contribution")
        private String contribution; // 本人贡献

        @Field("support")
        private String support; // 证明材料

        @Field("description")
        private String description; // 应用情况

        // 全参构造函数
        public MongoPaper(String candidateId, String paperId, String chineseTitle, String englishTitle, String type,
                          Integer position, String conference, String place, LocalDateTime yearOfConference,
                          Integer yearOfPublication, String language, String pages, String chineseAbstract,
                          String englishAbstract, String chineseKeywords, String englishKeywords, String fullText,
                          String link, String contribution, String support, String description) {
            this.candidateId = candidateId;
            this.paperId = paperId;
            this.chineseTitle = chineseTitle;
            this.englishTitle = englishTitle;
            this.type = type;
            this.position = position;
            this.conference = conference;
            this.place = place;
            this.yearOfConference = yearOfConference;
            this.yearOfPublication = yearOfPublication;
            this.language = language;
            this.pages = pages;
            this.chineseAbstract = chineseAbstract;
            this.englishAbstract = englishAbstract;
            this.chineseKeywords = chineseKeywords;
            this.englishKeywords = englishKeywords;
            this.fullText = fullText;
            this.link = link;
            this.contribution = contribution;
            this.support = support;
            this.description = description;
        }

        @Override
        public String toString() {
            return "MongoPaper{" +
                    "id='" + id + '\'' +
                    ", candidateId='" + candidateId + '\'' +
                    ", paperId='" + paperId + '\'' +
                    ", chineseTitle='" + chineseTitle + '\'' +
                    ", englishTitle='" + englishTitle + '\'' +
                    ", type='" + type + '\'' +
                    ", position=" + position +
                    ", conference='" + conference + '\'' +
                    ", place='" + place + '\'' +
                    ", yearOfConference=" + yearOfConference +
                    ", yearOfPublication=" + yearOfPublication +
                    ", language='" + language + '\'' +
                    ", pages='" + pages + '\'' +
                    ", chineseAbstract='" + chineseAbstract + '\'' +
                    ", englishAbstract='" + englishAbstract + '\'' +
                    ", chineseKeywords='" + chineseKeywords + '\'' +
                    ", englishKeywords='" + englishKeywords + '\'' +
                    ", fullText='" + fullText + '\'' +
                    ", link='" + link + '\'' +
                    ", contribution='" + contribution + '\'' +
                    ", support='" + support + '\'' +
                    ", description='" + description + '\'' +
                    '}';
        }

}
